package com.good.child.pressent;

import android.content.Context;

import com.good.child.bean.ai.CommunityBean;
import com.good.child.http.CommunityLogical;
import com.good.child.iview.CommunityIView;
import com.yimidida.library.base.BasePresenter;
import com.yimidida.library.base.ICallBackResultListener;

import java.util.List;

/**
 * Create by xiaojie on 2024/8/24
 * 社区模块
 */
public class CommunityPresenter extends BasePresenter<CommunityIView> {
    private Context context;

    public CommunityPresenter(Context context) {
        this.context = context;
    }

    public void getList(String userId){
        CommunityLogical.getInstance().requestCommunityList(context, userId, new ICallBackResultListener() {
            @Override
            public void onCallBack(Object result) {
                if (result!=null){
                    CommunityBean communityBean= (CommunityBean) result;
                    mView.getList(communityBean);
                }
            }
        });
    }
}
